is hidden-from-backtrace
ErrorsCollection

is hidden-from-backtrace

Synthesised documentation from type/Routine

From type/Routine

See Original text in context

multi sub trait_mod:<is>(Routine:D:$hidden-from-backtrace!)

Hides a routine from showing up in a default backtrace. For example

sub inner { die "OH NOEZ" };
sub outer { inner() };
outer();

produces the error message and backtrace

OH NOEZ
  in sub inner at bt.p6:1
  in sub outer at bt.p6:2
  in block <unit> at bt.p6:3

but if inner is marked with hidden-from-backtrace

sub inner is hidden-from-backtrace { die "OH NOEZ" };
sub outer { inner() };
outer();

the error backtrace does not show it:

OH NOEZ
  in sub outer at bt.p6:2
  in block <unit> at bt.p6:3